Remove work-around for the old tooltips code, and just set the action
authorChristian Persch <chpe@gnome.org>
Tue, 10 Jul 2007 18:00:43 +0000 (18:00 +0000)
committerChristian Persch <chpe@src.gnome.org>
Tue, 10 Jul 2007 18:00:43 +0000 (18:00 +0000)
2007-07-10  Christian Persch  <chpe@gnome.org>

* gtk/gtkaction.c: (gtk_action_sync_tooltip),
(gtk_action_set_tooltip):
* gtk/gtkuimanager.c: (update_node): Remove work-around for the old
tooltips code, and just set the action tooltip immediately on the
proxy widget. Bug #455482.

svn path=/trunk/; revision=18437

ChangeLog
gtk/gtkaction.c
gtk/gtkuimanager.c

index 33a8bc24a4f7787240da96d6cc2dcfb9f383c1fe..df6f417294bd9a377e5aedd8465fb813cd36b3cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-10  Christian Persch  <chpe@gnome.org>
+
+       * gtk/gtkaction.c: (gtk_action_sync_tooltip),
+       (gtk_action_set_tooltip):
+       * gtk/gtkuimanager.c: (update_node): Remove work-around for the old
+       tooltips code, and just set the action tooltip immediately on the
+       proxy widget. Bug #455482.
+
 2007-07-10  Kristian Rietveld  <kris@imendio.com>
 
        * gtk/gtktooltip.c (find_widget_under_pointer),
index 5c257a5bacd4af7cde0c1e18b6f424b23883c08a..49d40c36a5027fd27156a228f86e348b527c7291 100644 (file)
@@ -1451,13 +1451,8 @@ static void
 gtk_action_sync_tooltip (GtkAction *action,
                         GtkWidget *proxy)
 {
-  GtkWidget *parent;
-
-  parent = gtk_widget_get_parent (proxy);
-  
-  if (GTK_IS_TOOL_ITEM (proxy) && GTK_IS_TOOLBAR (parent))
-    gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (proxy),
-                                   action->private_data->tooltip);
+  gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (proxy),
+                                 action->private_data->tooltip);
 }
 
 static void 
@@ -1475,8 +1470,9 @@ gtk_action_set_tooltip (GtkAction   *action,
   for (p = action->private_data->proxies; p; p = p->next)
     {
       proxy = (GtkWidget *)p->data;
-      
-      gtk_action_sync_tooltip (action, proxy);
+
+      if (GTK_IS_TOOL_ITEM (proxy))
+        gtk_action_sync_tooltip (action, proxy);
     }
 
   g_object_notify (G_OBJECT (action), "tooltip");
index 687567d3d5f17c990d4f2ec5110dbdb804b6ffac..95aa71da67077099670f5c669c292bbe41f1d676 100644 (file)
@@ -2613,16 +2613,6 @@ update_node (GtkUIManager *self,
 
       if (info->proxy)
         {
-          /* FIXME: we must re-set the tooltip, since tooltips on 
-           * toolitems can't be set before the toolitem is added 
-           * to the toolbar.
-           */
-         gchar *tooltip;
-
-         g_object_get (G_OBJECT (action), "tooltip", &tooltip, NULL);
-         g_object_set (G_OBJECT (action), "tooltip", tooltip, NULL);
-         g_free (tooltip);
-     
           g_signal_connect (info->proxy, "notify::visible",
                            G_CALLBACK (update_smart_separators), NULL);
         }